package com.bole.service.impl;

import com.bole.dao.UserDao;
import com.bole.dto.user.UserDto;
import com.bole.pojo.TbUserDo;
import com.bole.service.UserService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    public UserDto getUserByTelePhone(String telePhone) {
        TbUserDo userByTelephone = userDao.getUserByTelephone(telePhone);
        UserDto userDto = new UserDto();
        BeanUtils.copyProperties(userByTelephone,userDto);
        return userDto;

    }
}
